<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			tr{
				
			}
		</style>
	</head>
	<body>
		<table border="0" cellspacing="" cellpadding="">
			<tr>
				<td>用户名：</td>
				<td><input type="text" name="name"/></td>
			</tr>
			<tr>
				<td>密码：</td>
				<td>
					<input type="password" name="paw"/>
				</td>
			</tr>
			<tr>
				<td>性别：</td>
				<td>
					<div>
						<label>男</label>
						<input name="radio" type="radio" value="男" checked>
						<label>女</label>
						<input name="radio" type="radio" value="女"/>
					</div>
				</td>
			</tr>
			<tr>
				<td>学院：</td>
				<td>
					<select name="学院">
						<option value ="龙岩学院">龙岩学院</option>
						<option value="闽西职业技术学院" selected>闽西职业技术学院</option>
					</select>
				</td>
			</tr>
			<tr>
				<td>爱好：</td>
				<td>
					<div>
						<label>游泳</label>
						<input name="爱好" type="checkbox" value="游泳" checked>
						<label>羽毛球</label>
						<input name="爱好" type="checkbox" value="羽毛球" checked/>
					</div>
				</td>
				
			</tr>
			<tr>
				<td>个人介绍：</td>
				<td><textarea rows="5" cols="20" value="爱好" name="个人介绍">学习</textarea></td>
			</tr>
			<tr>
				<td><input type="button" name="提交" value="提交" /></td>
			</tr>
		</table>
	</body>
	<script type="text/javascript">
		//按照name的方式查找各个元素
		//用户名
		var n1 = document.getElementsByName('name')
		console.log(n1);
		//密码
		var n2 = document.getElementsByName("paw")
		console.log(n2);
		//性别
		var n3 = document.getElementsByName('radio')
		console.log(n3);
		//学院
		var n4 = document.getElementsByName('学院')
		console.log(n4);
		//爱好
		var n5 = document.getElementsByName('爱好')
		console.log(n5);
		//个人介绍
		var n6 = document.getElementsByName('个人介绍')
		console.log(n6);
		//提交
		var n7 = document.getElementsByName('提交')
		console.log(n7);
		
		//按照标签的方式查找各个元素
		//input
		var b1 = document.getElementsByTagName('input')
		console.log(b1)
		//div
		var b2 = document.getElementsByTagName('div')
		console.log(b2)
		//textarea
		var b3 = document.getElementsByTagName('textarea')
		console.log(b3)
	</script>
</html>
